#include <iostream>
#include "Course.h"           //外部文件的引入
#include "CourseInHouse.h"
#include "CourseOutHouse.h"
#include <QDebug>

int main(int argc, char *argv[])
{
    CourseInHouse*cinhouse = new CourseInHouse();
    CourseOutHouse*couthouse = new CourseOutHouse();
    // new 两个对象（这里用指针定义），有两门课（前面的头文件里已经用QString定义）

    cinhouse->setName ("Math");
    cinhouse->setCode ("C01");         // 每门课有多种特性（多种值）
    cinhouse->setBuilding("E01");
    cinhouse->setUsingProjector(true);

    couthouse->setName ("Physics");
    couthouse->setCode ("C02");
    couthouse->setNeedTeacher(true);
    couthouse->setUsingPlayground(false);
    couthouse->setIfDependsOnWeather(false);

    qDebug() << cinhouse->name()
             << cinhouse->code()     //调试性的将这些值打印出来
             << cinhouse->Building()
             << cinhouse->usingProjector();

    qDebug() << couthouse->name()
             << couthouse->code()
             << couthouse->needTeacher()
             << couthouse->usingPlayground()
             << couthouse->ifDependsOnWeather();

    delete cinhouse;
    delete couthouse;                 //定义指针后立马在这里进行释放！
    return 0;
}
